package com.fable.sp.core.domain;

import java.io.Serializable;

/**
 * .
 *
 * @author stormning on 16/8/1.
 */
public class Box implements Serializable {
    private Integer top;
    private Integer right;
    private Integer bottom;
    private Integer left;

    public Integer getTop() {
        return top;
    }

    public void setTop(Integer top) {
        this.top = top;
    }

    public Integer getRight() {
        return right;
    }

    public void setRight(Integer right) {
        this.right = right;
    }

    public Integer getBottom() {
        return bottom;
    }

    public void setBottom(Integer bottom) {
        this.bottom = bottom;
    }

    public Integer getLeft() {
        return left;
    }

    public void setLeft(Integer left) {
        this.left = left;
    }

    public String toString(String prefix) {
        StringBuilder builder = new StringBuilder();
        if (top != null) {
            builder.append(prefix).append("-top:").append(top).append("px;");
        }
        if (right != null) {
            builder.append(prefix).append("-right:").append(right).append("px;");
        }
        if (bottom != null) {
            builder.append(prefix).append("-bottom:").append(bottom).append("px;");
        }
        if (left != null) {
            builder.append(prefix).append("-left:").append(left).append("px;");
        }
        return builder.toString();
    }
}
